package lab02.test30;


import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;

public class Test30 {
    public static void main(String[] args) {
        List<Double> score=new ArrayList<Double>();
        Double sum=0.0;
        Scanner in=new Scanner(System.in);
        System.out.println("请输入学生成绩以160结束：");
        sep:while (true){
            Double score1=in.nextDouble();
            if (score1==160){
               break sep;
            }
            score.add(score1);
        }
        for(Double score2:score){
            sum=sum+score2;
        }
        System.out.println("平均成绩为："+sum/score.size());
    }
}
